import { postData, getData } from '@/api/common/index';

const baseCommissionInfo = '/api/commission-info';

// 获取佣金分页
export function getCommissionInfoPage(
	params: any,
	pageNo: number | null | undefined,
	pageSize: number | null | undefined,
): Promise<any> {
	const url =
		baseCommissionInfo +
		'/page' +
		'?pageNum=' +
		(pageNo ? pageNo : 1) +
		'&pageSize=' +
		(pageSize ? pageSize : 10);
	return postData(url, params);
}

// 获取佣金详情（如后续需要）
export function getCommissionInfoDetail(id: number): Promise<any> {
	return getData(baseCommissionInfo + '?id=' + id);
}
